package cn.com.service.impl;

import cn.com.dao.UserDao;
import cn.com.dao.impl.UserDaoImpl;
import cn.com.domain.User;
import cn.com.service.UserService;

import java.util.List;

public class UserServiceImpl implements UserService {
    private UserDao dao=new UserDaoImpl();
    @Override
    public List<User> findAll() {
        return dao.findAll();
    }

    @Override
    public User findUserBynameAndPassword(String username,String password) {
        return dao.findUserBynameAndPassword(username,password);
    }

    @Override
    public void addUser(User user) {
        dao.addUser(user);
    }

    @Override
    public void delteUser(User user) {
        dao.delteUser(user);
    }
}
